﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TweetSharp;

namespace CMS.Utils
{
    public class TweetManager
    {
        private TwitterService Service;

        public TweetManager(string accessToken, string accessTokenSecret, string consumerKey, string consumerSecret)
        {
            Service = new TwitterService(consumerKey, consumerSecret);
            Service.AuthenticateWith(accessToken, accessTokenSecret);
        }

        public void SendTweet(string message)
        {
            SendTweetOptions options = new SendTweetOptions() {
                Status = message
            };

            Service.SendTweet(options);
        }
    }
}
